import React, { Suspense, lazy } from 'react';
// 导入创建路由的函数
import { createBrowserRouter, RouterProvider } from "react-router-dom";
import Home from "@/views/home/index";
import My from "@/views/My/index";

const router = createBrowserRouter([
  {
    path: "/",
    // element: lazy(() => import('../views/home/index')),
    element: <Home></Home>,
  },
  {
    path: "/my",
    element: <My></My>,
  },
]);

export default function AppRouter() {
  return <RouterProvider router={router} />;
}
